package com.it.you.base.designmode.singleton;

import java.util.concurrent.atomic.AtomicLong;

public class IdGenerator_EHan {
    private AtomicLong id = new AtomicLong(0);
    private static final IdGenerator_EHan instance = new IdGenerator_EHan();

    private IdGenerator_EHan() {

    }

    public static IdGenerator_EHan getInstance() {
        return instance;
    }

    public long getId() {
        return id.incrementAndGet();
    }
}
